package stringMVC.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import stringMVC.model.MessageInfo;
import stringMVC.model.UserInfo;

import java.util.List;

@Mapper
public interface InfoMapper {
    @Select("select * from message_info where delete_flag <> 1")
    List<MessageInfo> query();

    @Insert("insert into message_info (`from`,`to`,`message`) values (#{from}, #{to}, #{message})")
    Integer insert(MessageInfo messageInfo);

}
